package com.cloud.base.designmode.observer;

public class ObserverApplication {
    public static void main(String[] args) {
        ObServer textMessageObServer = new TextMessageObServer();
        ObServer weChatObServer = new WeChatObServer();
        MsgSubject msgSubject = new MsgSubject();
        msgSubject.addObServer(textMessageObServer);
        msgSubject.addObServer(weChatObServer);
        msgSubject.notifyObServerAll("mayikt");
    }
}